#include <iostream>
#include <thread>
using namespace std;

int main()
{
    cout << "Main id = " << this_thread::get_id() << endl;

    thread th([](int x)
              {
                cout << "Child id = " << this_thread::get_id() << endl;
                cout << "void Lambda()" << endl;
                cout << "x = " << x << endl; }, 5);

    cout << "Child id = " << th.get_id() << endl;
    th.join(); // 主线程等待子线程执行结束
    return 0;
}